#include "Action.h"

using namespace std;

Action::Action()
{
	m_menu.clear();
	m_menu.push_back("11.Combat");
	m_menu.push_back("12.Deplacer");
	m_menu.push_back("13.Gestion");
	m_menu.push_back("14.Interagir");
	m_menu.push_back("0.Annuler");
}

void Action::addElem(std::string action)
{
	//permet de trouver le mot et de ne garder que ce qui suit.
	if(action.find("action/") != string::npos)
	{
		action = action.substr(7);
		m_menu[m_menu.size()-1] = action;
		m_menu.push_back("0.Annuler");
	}
}

void Action::supprElem()
{
	cout<<"Impossible de supprimer un menu"<<endl;
}
	
string Action::getElem(int i)
{
	return m_menu[i];
}

int Action::getSize()
{
	return m_menu.size();
}
